package com.subway.babynote.syncservice;

import java.util.List;

import com.subway.babynote.syncdata.ClientDataRecord;
import com.subway.babynote.syncdata.ClientDataRecordBase;
import com.subway.babynote.syncdata.pWrapper;
import com.subway.babynote.syncdata.wrapper;
import com.subway.babynote.syncdata.ClientDataRecord.uxRecord;

import com.subway.babynote.syncservice.taskList.tsPair;

import android.content.Context;

public abstract class taskHelper {
	public abstract boolean init(Context context, RunnableTask rt);
	public abstract void finalize();
	public abstract ClientDataRecord.usersRecord getuser();
	public abstract int getclientid();
	public abstract int regVisitor();
	public abstract int regUser(ClientDataRecord.usersRecord ur);
	public abstract int loginUser(String username, String passwd);
	
	public abstract int syncWeibo(String username, String passwd);
	public abstract int unbindWeibo();
	public abstract int logout();
	
	public abstract int getFoodUX(int food_id, List<Float> l, pWrapper.MinMax mm);
	public abstract int getWeightUX(List<Float> l, pWrapper.MinMax mm);
	public abstract int getHeightUX(List<Float> l, pWrapper.MinMax mm);
	
	public static taskHelper gettaskHelper()
	{
		return new taskHelp_impl();
	}

	// function needs db info from UI
	public abstract int AddFeed(ClientDataRecord.feedRecord fr) ;

	public abstract int AddVisitor(int birth, boolean gender) ;
	
	public abstract int AddUser(int birth, boolean gender,String email, String password ) ;

	// not sure if this table split ot Height and Weight Table?
	public abstract int AddHUser(float height);
	public abstract int AddWUser(float weight);

	public abstract int AddFeedback(String content);

	//
	public abstract int updateUserInfo(int birth, boolean gender);
	
	// get our contact info from db
	public abstract List<ClientDataRecord.contactRecord> getOurContact();

	// get the records from the local_avg
	public abstract List<ClientDataRecord.last_avgRecord> getAverage() ;

	public abstract int getFoodPropid(String food_prop);

	public abstract ClientDataRecord.weiboRecord getWeibo() ;

	// get record from the tips table
	public abstract List<ClientDataRecord.tipRecord> getTips() ;

	// get record from the localinfo table
	public abstract ClientDataRecord.loadinfoRecord getLoadInfo() ;

	// get user record from the User table
	public abstract ClientDataRecord.usersRecord getUser() ;

	public abstract boolean getUserGender() ;

	public abstract int getUserAge() ;

	// get User id from the User table
	public abstract int getUserid();
	public abstract int getVisitorid();

	// get record from food by foodname
	public abstract ClientDataRecord.foodsRecord getFood(String foodname) ;
	
	// get record by foodid
	public abstract ClientDataRecord.foodsRecord getFood (int food_id) ;


	// get min ,mid ,max weight info
	public abstract ClientDataRecord.hwAvgRecord getWeight(int age, boolean gender) ;

	// get min mid max weight info
	public abstract ClientDataRecord.hwAvgRecord getHeight(int age, boolean gender) ;
	
	public abstract List<ClientDataRecord.foodsRecord> getFoodybyCategory(String category) ;

	public abstract List<ClientDataRecord.foodsRecord> getFoodbyProp(int prop_id) ;
	
	// get Sum Record of feed
	public abstract List<ClientDataRecord.clientFeedRecord> getSumFeeds(int date);
	// get Feed records
	public abstract List<ClientDataRecord.clientFeedRecord> getFeeds(int date);
	
	public abstract uxRecord get_w_ux();
	public abstract uxRecord get_h_ux();
	public abstract uxRecord get_food_ux(int food_id);
	
}
